@echo off
setlocal enabledelayedexpansion

echo Building for Windows...
set GOOS=windows
set GOARCH=amd64
go build main.go

if %errorlevel% neq 0 (
    echo Windows build failed.
    exit /b %errorlevel%
)

echo Building for Linux...
set GOOS=linux
set GOARCH=amd64
go build main.go

if %errorlevel% neq 0 (
    echo Linux build failed.
    exit /b %errorlevel%
)

echo Builds completed successfully.
pause
exit /b 0
